#!/usr/bin/perl
## format-bbcode.pl
## Copyright 2008 Benjamin P. Burhans
## Converts Tremulous color encoding (a caret and a number) to BBCode tags for forum use.
##
##    This file is part of TremTools by *Einstein.
##
##    TremTools is free software: you can redistribute it and/or modify
##    it under the terms of the GNU General Public License as published by
##    the Free Software Foundation, either version 3 of the License, or
##    (at your option) any later version.
##
##    TremTools is distributed in the hope that it will be useful,
##    but WITHOUT ANY WARRANTY; without even the implied warranty of
##    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##    GNU General Public License for more details.
##
##    You should have received a copy of the GNU General Public License
##    along with TremTools.  If not, see <http://www.gnu.org/licenses/>.
##

use strict; ## recommended left uncommented for a solid program
use warnings; ## ditto

my $file = $ARGV[0];

unless ($file) {
	die "format-bbcode: failed - no file specified\n";
}

if ($file) {
	open (my $in, "<", $file) or die "*format-bbcode: failed - $!";
	print "format-bbcode: executing...\n";
	print $file;
	print "\n";
}
